/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Controlador;

/**
 *
 * @author WalteR
 */
public class Recursos {
    private int gold = 1000;
    private int silver = 100 ;
    private int energia = 30 ;
    private int petroleo = 200 ;
    private int madera = 200 ;
    private int experiencia = 0 ;
    private int turno = 0 ;
    private int nivel = 1 ;
    private int poblacionTotal = 100 ;
    private int poblacionActual = 0 ;
    private String nombreCiudad ;

    public void setGold(int gold){ this.gold = gold ;}
    public void setSilver(int silver){ this.silver = silver ;}
    public void setEnergia(int energia){ this.energia = energia ;}
    public void setPetroleo(int petroleo){ this.petroleo = petroleo ;}
    public void setMadera(int madera){ this.madera = madera ;}
    public void setNivel(int niv){ this.nivel = niv;}
    public void setPobTotal(int pob){ this.poblacionTotal = pob ;}
    public void setPobActual(int pob){ this.poblacionActual = pob ;}
    public void setNombre(String s){ this.nombreCiudad = s ;}
    public void setExp(int exp){
        this.experiencia = exp ;
        if( nivel < (int)Math.sqrt((double)experiencia)+1 ){
            setNivel( nivel + 1 ) ;
            energia = 30 ;
        }
    }

    public int getGold(){ return gold ;}
    public int getSilver(){ return silver ;}
    public int getEnergia(){ return energia ;}
    public int getPetroleo(){ return petroleo ;}
    public int getMadera(){ return madera ;}
    public int getExp(){ return experiencia ;}
    public int getNivel(){ return nivel ;}
    public int getPobTotal(){ return poblacionTotal ;}
    public int getPobActual(){ return poblacionActual ;}

    public String reporte1(){
        String resp = "Nivel: " + nivel + "      Oro: " + gold + "      Mineral: " + silver + "      Petroleo: " + petroleo + "      Madera: " + madera ;
        return resp ;
    }

    public String reporte2(){
        String resp = "Energia: " + energia + "      Experiencia: " + experiencia + "      Pob. Actual: "  + poblacionActual + "      Pob. Total: " + poblacionTotal ;
        return resp ;
    }
}